package com.kaipizhe.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.method.HandlerTypePredicate;
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author DengTao
 * @version 1.0
 * @since 2024/10/31 20:55
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {

    @Override
    public void configurePathMatch(PathMatchConfigurer configurer) {
        configurer.addPathPrefix("admin", HandlerTypePredicate.forBasePackage("com.kaipizhe.controller.admin"));
        configurer.addPathPrefix("web", HandlerTypePredicate.forBasePackage("com.kaipizhe.controller.web"));
        configurer.addPathPrefix("open", HandlerTypePredicate.forBasePackage("com.kaipizhe.controller.open"));
        configurer.addPathPrefix("app", HandlerTypePredicate.forBasePackage("com.kaipizhe.controller.app"));
    }

}
